home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Financial / Stopwatch2.3 / Source / ClientInfo.h < prev    next >
Text File  |  1995-06-12  |  2KB  |  82 lines

  1. /*
  2.  * Manage the time information for a single client.  The main
  3.  * Controller maintains a list of these.
  4.  *
  5.  * For legal stuff see the file COPYRIGHT
  6.  */
  7. #import <stdio.h>
  8. #import <objc/Object.h>
  9. #import "SortList.h"
  10.  
  11. @interface ClientInfo : Object
  12. {
  13.   char    *shortName;        /* abbreviated name for filenames and lists */
  14.   char    *clientName;        /* the company */
  15.   char    *contactName;        /* the individual the invoice goes to */
  16.   char    *street;
  17.   char    *city;
  18.   char    *state;
  19.   char    *zipCode;
  20.   char    *faxNumber;
  21.   char    *emailAddr;
  22.   float    hourlyRate;
  23.   float totalMins;        /* sum of hours worked in all sessions */
  24.   SortList    *sessionList;        /* a list of Sessions, obviously */
  25.   SortList    *expenseList;        /* likewise... */
  26. }
  27.  
  28. - init;
  29. - free;
  30.  
  31. - (const char *)lastDescription;
  32.  
  33. - setShortName:(const char *)str;
  34. - setClientName:(const char *)str;
  35. - setContactName:(const char *)str;
  36. - setStreet:(const char *)str;
  37. - setCity:(const char *)str;
  38. - setAddrState:(const char *)str;
  39. - setZipCode:(const char *)str;
  40. - setFaxNumber:(const char *)str;
  41. - setEmailAddr:(const char *)str;
  42. - setTotalMins:(int)value;
  43. - setHourlyRate:(float)value;
  44.  
  45. - (const char *)shortName;
  46. - (const char *)clientName;
  47. - (const char *)contactName;
  48. - (const char *)street;
  49. - (const char *)city;
  50. - (const char *)addrState;
  51. - (const char *)zipCode;
  52. - (const char *)faxNumber;
  53. - (const char *)emailAddr;
  54. - (void)computeTotalMins;
  55. - (int)totalMins;
  56. - (float)totalHours;
  57. - (float)hourlyRate;
  58. - (float)totalBillable;
  59. - (float)totalExpenses;
  60.  
  61. - (int)sessionCount;
  62. - sessionAt:(int)position;
  63. - addSession:session;
  64. - deleteSession:session;
  65. - (void)compactSessions;
  66. - (void)computeTotalMins;
  67. - (void)deleteSessionsAndExpenses;
  68. - (void)sortSessions;
  69.  
  70. - (int)expenseCount;
  71. - expenseAt:(int)position;
  72. - addExpense:expense;
  73. - deleteExpense:expense;
  74. - (void)deleteAllExpenses;
  75. - (void)sortExpenses;
  76.  
  77. - (void)exportToFile:(FILE *)fp;
  78.  
  79. - read: (NXTypedStream *) stream;
  80. - write:(NXTypedStream *) stream;
  81. @end
  82.